
void UI_MoveRotateOptions::destroy() {
    PF_SETTINGS->beginGroup("/Modify");
    PF_SETTINGS->writeEntry("/MoveRotate", leAngle->text());
    PF_SETTINGS->endGroup();
}


void UI_MoveRotateOptions::setAction(PF_ActionInterface* a, bool update) {
    if (a!=NULL && a->rtti()==LX_Define::ActionModifyMoveRotate) {
        action = (WF_ModifyMoveRotate*)a;

        QString sa;
        if (update) {
            sa = QString("%1").arg(PF_Math::rad2deg(action->getAngle()));
        } else {
            PF_SETTINGS->beginGroup("/Modify");
            sa = PF_SETTINGS->readEntry("/MoveRotate", "30");
            PF_SETTINGS->endGroup();
            action->setAngle(PF_Math::deg2rad(sa.toDouble()));
        }
        leAngle->setText(sa);
    } else {
        PF_DEBUG->print(PF_Debug::D_ERROR, 
			"UI_CircleOptions::setAction: wrong action type");
        action = NULL;
    }

}

void UI_MoveRotateOptions::updateAngle(const QString& a) {
    if (action!=NULL) {
        action->setAngle(PF_Math::deg2rad(PF_Math::eval(a)));
    }
}
